package com.lscl.rabbitmq.listener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class Listener_03_Fanout {

    @RabbitListener(queues = "boot_fanout_queue1")
    public void boot_fanout_queue1(Message message){
        System.out.println("boot_fanout_queue1: "+new String(message.getBody()));
    }

    @RabbitListener(queues = "boot_fanout_queue2")
    public void boot_fanout_queue2(Message message){
        System.out.println("boot_fanout_queue2: "+new String(message.getBody()));
    }

}
